\subsection{Independence of the constructible universe}
In this subsection, we show \( \Con(\mathsf{ZFC} + \mathrm{V} \neq \mathrm{L}) \), and thus \( \mathrm{V} \neq \mathrm{L} \) is independent of the axioms of \( \mathsf{ZFC} \).
\begin{theorem}
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} \).
    Then there is a countable transitive model \( N \supseteq M \) such that \( N \vDash \mathsf{ZFC} + \mathrm{V} \neq \mathrm{L} \).
\end{theorem}
\begin{proof}
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} \), and let \( \mathbb P \in M \) be any atomless forcing poset (that is, it has no minimal elements), for example \( \Fn(\omega, 2) \).
    Since \( M \) is countable, we can let \( G \) be a \( \mathbb P \)-generic filter over \( M \).
    As \( \mathbb P \) is atomless, \( G \notin M \).
    Hence \( M \subsetneq M[G] \vDash \mathsf{ZFC} \).

    We show that \( M[G] \vDash \mathrm{V} \neq \mathrm{L} \).
    Therefore,
    \[ \mathrm{L}_{\mathrm{Ord} \cap M} = \mathrm{L}^M \subseteq M \subsetneq M[G] \]
    By the generic model theorem, \( \mathrm{Ord} \cap M = \mathrm{Ord} \cap M[G] \), so \( M[G] \neq \mathrm{L}_{\mathrm{Ord} \cap M[G]} = \mathrm{L}^{M[G]} \).
    In particular, we have \( (\mathrm{V} \neq \mathrm{L})^{M[G]} \).
\end{proof}
We will now discuss how to remove the assumption that we have a countable transitive model of \( \mathsf{ZFC} \).
\begin{theorem}
    If \( \Con(\mathsf{ZFC}) \), then \( \Con(\mathsf{ZFC} + \mathrm{V} \neq \mathrm{L}) \).
    Hence, \( \mathsf{ZFC} \nvdash \mathrm{V} = \mathrm{L} \).
\end{theorem}
\begin{proof}
    Suppose that \( \mathsf{ZFC} + \mathrm{V} \neq \mathrm{L} \) gives rise to a contradiction.
    Then, from a finite set of axioms \( \Gamma \subseteq \mathsf{ZFC} + \mathrm{V} \neq \mathrm{L} \), we can find \( \psi \) such that \( \Gamma \vdash \psi \wedge \neg \psi \).
    By following the previous proofs, there is a finite set of axioms \( \Lambda \subseteq \mathsf{ZFC} \) such that \( \mathsf{ZFC} \) proves that if there is a countable transitive model of \( \Lambda \), then there is a countable transitive model of \( \Gamma \).
    This set \( \Lambda \) should be sufficient to do the following:
    \begin{enumerate}
        \item to prove basic properties of forcing and constructibility;
        \item to prove the necessary facts about absoluteness, such as absoluteness of finiteness, partial orders and so on;
        \item to prove facts about forcing, including the forcing theorem; and
        \item if \( M \) is a countable transitive model of \( \Lambda \) with \( \mathbb P \in M \) and \( G \) is \( \mathbb P \)-generic over \( M \), then \( \Lambda \) proves that \( M[G] \vDash \Gamma \).
    \end{enumerate}
    As \( \Lambda \) is finite and a subset of the axioms of \( \mathsf{ZFC} \), then by the reflection theorem there is a countable transitive model of \( \Lambda \).
    Hence, there is a countable transitive model \( N \) of \( \Gamma \).
    But \( \Gamma \vdash \psi \wedge \neg\psi \), so \( N \vDash \psi \wedge \neg\psi \).
    Hence \( (\psi \wedge \neg\psi)^N \), so in \( \mathsf{ZFC} \) we can prove \( \psi^N \wedge \neg\psi^N \), so \( \mathsf{ZFC} \) is inconsistent.
\end{proof}
\begin{remark}
    Gunther, Pagano, S\'anchez Terraf, and Steinberg recently completed a formalisation of the countable transitive model approach to forcing in the interactive theorem prover Isabelle.
    To obtain \( \Con(\mathsf{ZFC}) \to \Con(\mathsf{ZFC} + \neg\mathsf{CH}) \), they used \( \mathsf{ZC} \) together with 21 instances of replacement, which are explicitly enumerated in the paper.
\end{remark}

\subsection{Cohen forcing}
Fix a countable transitive model \( M \) of \( \mathsf{ZFC} \).
Recall that for \( I, J \in M \),
\begin{enumerate}
    \item \( \Fn(I, J) = \qty{p \mid p \text{ is a finite partial function } I \to J} \), together with \( \supseteq \) and \( \varnothing \), has the structure of a forcing poset.
    \item \( \Fn(I, J) \) is always a set in \( M \).
    \item \( \Fn(I, J) \) has the countable chain condition if and only if \( I \) is empty or \( J \) is countable.
    \item The sets \( D_i = \qty{q \in \Fn(I, J) \mid i \in \dom q} \) and \( R_j = \qty{q \in \Fn(I, J) \mid i \in \ran q} \) are dense for all \( i \in I \) and \( j \in J \).
\end{enumerate}
Now, suppose that \( G \subseteq \Fn(I, J) \) is generic over \( M \).
Since \( G \) is a filter, if \( p, q \in G \) then \( p \cap q \in G \).
Hence, if \( p, q \in G \), then \( p, q \) agree on the intersection of their domains.
Let \( f_G = \bigcup G \).
Then \( f_G \) is a function domain contained in \( I \) and range contained in \( J \).
Note that this function has name
\[ \dot f = \qty{\langle p, \operatorname{op}(\check \imath, \check \jmath) \rangle \mid p \in \mathbb P, \langle i, j \rangle \in p} \]
Since \( D_i, R_j \) are dense, we obtain \( G \cap D_i \neq \varnothing \), so we must have \( i \in \dom f_G \).
Similarly, \( j \in \ran f_G \).
We therefore obtain the following.
\begin{proposition}
    Let \( G \subseteq \Fn(I, J) \) be a generic filter over \( M \), and suppose \( I, J \) are nonempty.
    Then \( M[G] \vDash f_G : I \to J \) is a surjection.
\end{proposition}
\begin{proposition}
    Suppose that \( I, J \) are nonempty sets, at least one of which is infinite.
    Then
    \[ \abs{\Fn(I, J)} = \max(\abs{I}, \abs{J}) \]
\end{proposition}
In particular, \( \abs{\Fn(\omega, 2)} = \aleph_0 \).
\begin{proof}
    Each condition \( p \in \Fn(I, J) \) is a finite function, so from this it follows that
    \[ \Fn(I, J) \subseteq (I \times J)^{<\omega} \]
    Hence
    \[ \Fn(I, J) \subseteq \abs{(I \times J)^{<\omega}} = \abs{I \times J} = \max(\abs{I}, \abs{J}) \]
    For the reverse direction, if we fix \( i_0 \in I \) and \( j_0 \in J \), then
    \[ \abs{\langle i_0, j \rangle \mid j \in J} \cup \qty{\langle i, j_0 \rangle \mid i \in I} \]
    is a collection of \( \abs{I \cup J} \)-many distinct elements of \( \Fn(I, J) \).
    Thus
    \[ \max(\abs{I}, \abs{J}) = \abs{I \cup J} \leq \Fn(I, J) \]
    as required.
\end{proof}
We aim to provide a model in which \( \mathsf{CH} \) fails.
To do this, we will consider the forcing poset \( \Fn(\omega_2^M \times \omega, 2) \).
We may consider \( f_G : \omega_2^M \times \omega \to 2 \), and let \( g_\alpha : \omega \to 2 \) be the function defined by \( g_\alpha(n) = f_G(\alpha, n) \).
This provides \( \omega_2^M \)-many reals in \( M[G] \).
To show that \( M[G] \vDash \mathsf{ZFC} + \neg\mathsf{CH} \), we must show that all of the \( g_\alpha \) are distinct, and that
\[ \omega_1^{M[G]} = \omega_1^M;\quad \omega_2^{M[G]} = \omega_2^M \]
It will turn out that the countable chain condition guarantees that all cardinals in \( M \) remain cardinals in \( M[G] \).
\begin{example}
    Let \( \kappa \) be an uncountable cardinal in \( M \), and consider \( \Fn(\omega, \kappa) \), which does not satisfy the countable chain condition.
    Then in \( M[G] \), the function \( f_G : \omega \to \kappa \) is a surjection.
    Hence, \( \kappa \) has been collapsed into a countable ordinal in \( M[G] \).
\end{example}

\subsection{Preservation of cardinals}
\begin{definition}
    Let \( \mathbb P \in M \) be a forcing poset.
    We say that \( \mathbb P \) \emph{preserves cardinals} if and only if for every generic filter \( G \subseteq \mathbb P \) over \( M \) and every \( \kappa \in \mathrm{Ord} \cap M \),
    \[ (\kappa \text{ is a cardinal})^M \leftrightarrow (\kappa \text{ is a cardinal})^{M[G]} \]
    Also, \( \mathbb P \) \emph{preserves cofinalities} if and only if for every generic filter \( G \subseteq \mathbb P \) over \( M \),
    \[ \cf^M(\gamma) = \cf^{M[G]}(\gamma) \]
    for all limit ordinals \( \gamma \).
\end{definition}
Recall that being a cardinal is \( \Pi_1 \)-definable so downwards absolute.
In particular, cardinals of \( M[G] \) are automatically cardinals of \( M \).
Also, note that finiteness and being \( \omega \) are absolute.
\begin{lemma}
    Let \( \mathbb P \in M \) be a forcing poset.
    Then
    \begin{enumerate}
        \item \( \mathbb P \) preserves cofinalities if and only if for every generic filter \( G \), for all limit ordinals \( \beta \) with \( \omega < \beta < \mathrm{Ord} \cap M \),
        \[ (\beta \text{ is regular})^M \to (\beta \text{ is regular})^{M[G]} \]
        and
        \item if \( \mathbb P \) preserves cofinalities, then \( \mathbb P \) preserves cardinals.
    \end{enumerate}
\end{lemma}
The converse of (ii) is not true.
Note that the definition of regularity did not require being a cardinal, but is a consequence.
\begin{proof}
    \emph{Part (i).}
    Suppose \( \mathbb P \) preserves cofinalities and \( G \) is \( \mathbb P \)-generic.
    Fix a limit ordinal \( \beta \) such that \( \omega < \beta < \mathrm{Ord} \cap M \).
    Then if \( \beta \) is regular in \( M \), we have
    \[ \beta = \cf^M(\beta) = \cf^{M[G]}(\beta) \]
    Hence \( \beta \) is regular in \( M[G] \).
    Conversely, suppose \( \gamma \) is a limit ordinal such that \( \omega < \gamma < \mathrm{Ord} \cap M \).
    Let \( \beta = \cf^M(\gamma) \).
    Then \( \beta \) is a regular cardinal in \( M \).
    Let \( f \in M \) be a strictly increasing cofinal function \( \beta \to \gamma \).
    If \( \beta \) is uncountable in \( M \), then \( \beta \) is regular in \( M[G] \) by assumption.
    Otherwise, \( \beta = \omega \), and then \( \beta = \omega^{M[G]} \) by absoluteness, and so again \( \beta \) is regular in \( M[G] \).
    As \( f \in M \), also \( f \in M[G] \), so there is a strictly increasing cofinal map \( \beta \to \gamma \) in \( M[G] \), so
    \[ \cf^{M[G]}(\gamma) = \cf^{M[G]}(\beta) = \beta = \cf^M(\gamma) \]

    \emph{Part (ii).}
    Suppose that \( \mathbb P \) preserves cofinalities.
    Let \( \kappa \) be a cardinal in \( M \).
    One of three cases occur.
    \begin{enumerate}[(a)]
        \item If \( \kappa \leq \omega \), then \( (\kappa \leq \omega)^{M[G]} \), so \( \kappa \) is a cardinal in \( M[G] \);
        \item If \( \kappa \) is regular in \( M \), then \( \kappa \) is regular in \( M[G] \) by (i), so it is a cardinal in \( M[G] \).
        \item Suppose \( \kappa \) is singular in \( M \).
        In this case, one can show that \( \kappa \) is the supremum of a set \( S \) of regular cardinals in \( M \).
        One way to show this is that if \( \kappa \) is the supremum of a set \( T \) of cardinals, we can set \( S = \qty{\lambda^+ \mid \lambda \in T} \).
        Since \( \mathbb P \) preserves regular cardinals, every element of \( S \) is regular in \( M[G] \), and in particular they are cardinals.
        Hence \( \kappa \) is the supremum of a set of cardinals, and is therefore a cardinal.
    \end{enumerate}
\end{proof}
\begin{lemma}[the approximation lemma]
    Let \( A, B, \mathbb P \in M \), and suppose that \( (\mathbb P \text{ has the countable chain condition})^M \).
    Let \( G \) be \( \mathbb P \)-generic over \( M \).
    Then for any function \( f \in M[G] \) with \( f : A \to B \), there is a function \( F \in M \) with \( F : A \to \mathcal P^M(B) \) such that for all \( a \in A \), we have \( f(a) \in F(a) \) and \( \abs{F(a)} \leq \aleph_0 \).
\end{lemma}
This proof requires that \( M \) is countable.
Note that the relativisation of the countable chain condition to \( M \) ensures that the hypothesis is non-vacuous, as any forcing poset in \( M \) is externally countable.
\begin{proof}
    Suppose that \( M[G] \vDash f : A \to B \).
    Since \( A, B \in M \), we have canonical names \( \check A, \check B \in M^{\mathbb P} \).
    Let \( \dot f \) be a name for \( f \).
    By the forcing theorem, there is a condition \( p \in G \) such that
    \[ p \Vdash \dot f : \check A \to \check B \text{ is a function} \]
    Define \( F : A \to \mathcal P^M(B) \) by
    \[ F(a) = \qty{b \in B \mid \exists q \leq p.\, q \Vdash \dot f(\check a) = \check b} \]
    Note that \( F(a) \in M \) by the definability of the forcing relation, so as \( A \in M \), the set
    \[ F = \qty{\langle a, F(a) \rangle \mid a \in A} \]
    is a set in \( M \).
    We now show that this definition has the desired properties.
    Observe that as \( F \) is a function in \( M \), it is also a function in \( \mathrm{V} \).
    We show that \( f(a) \in F(a) \).
    Suppose that \( M[G] \vDash f(a) = b \) for \( b \in B \).
    By the forcing theorem, there is \( q \in G \) such that \( q \Vdash \dot f(\check a) = \check b \).
    As \( G \) is a filter, there is \( r \leq p, q \) with \( r \in G \) witnessing \( b \in F(a) \) as required.

    We now show that \( \abs{F(a)} \leq \aleph_0 \).
    Working in \( M \), and in particular using the axiom of choice in \( M \), for each \( b \in F(a) \) there is a condition \( q_b \leq p \) such that \( q_b \Vdash \dot f(\check a) = \check b \).
    It suffices to show that \( q_b \perp q_c \) for \( b \neq c \), because then they form an antichain, so by the countable chain condition we may conclude \( \abs{F(a)} \leq \aleph_0 \).
    Suppose not, so let \( r \leq q_b, q_c \).
    Then
    \[ r \Vdash \dot f : \check A \to \check B \text{ is a function} \wedge \dot f(\check a) = \check b \wedge \dot f(\check a) = \check c \wedge \check b \neq \check c \]
    Let \( H \) be a generic filter with \( r \in H \); this exists by countability of \( M \).
    Then \( r \leq p \) and
    \[ M[G] \vDash f : A \to B \text{ is a function} \wedge f(a) = b \wedge f(a) = c \wedge b \neq c \]
    But \( M[H] \vDash \mathsf{ZFC} \), giving a contradiction.
\end{proof}
\begin{theorem}
    If \( \mathbb P \in M \) is a forcing poset and \( (\mathbb P \text{ has the countable chain condition})^M \), then \( \mathbb P \) preserves cofinalities and hence cardinals.
\end{theorem}
\begin{proof}
    Using the previous lemma, it suffices to show that \( \mathbb P \) preserves regular cardinals.
    That is, if \( \omega < \beta < \mathrm{Ord} \cap M \) and \( \beta \) is a limit, then if \( \beta \) is a regular cardinal in \( M \), then \( \beta \) is a regular cardinal in \( M[G] \).
    Suppose this is not the case, so there is such a \( \beta \) that is a regular cardinal in \( M \) but singular in \( M[G] \).
    In \( M[G] \), we can fix a cofinal map \( f : \alpha \to \beta \) for some ordinal \( \alpha < \beta \).
    As \( \alpha, \beta \in M \), we can use the approximation lemma to find a function \( F : \alpha \to \mathcal P^M(\beta) \) in \( M \) such that for all \( \gamma \in \alpha \), we have \( f(\gamma) \in F(\gamma) \) and \( \abs{F(\gamma)} \leq \aleph_0 \).
    Working in \( M \), let \( X = \bigcup_{\gamma < \alpha} F(\gamma) \).
    This is a union of countable sets indexed by \( \alpha < \beta \).
    So \( X \subseteq \beta \) and is a subset of less than \( \beta \)-many countable sets.
    Hence \( X \neq \beta \) as \( \beta \) is a regular cardinal in \( M \).
    But \( f \) was cofinal, so \( \beta = \bigcup_{\alpha < \gamma} f(\gamma) \subseteq X \), giving a contradiction.
    % TODO: Why this last \subseteq?
\end{proof}

\subsection{The failure of the continuum hypothesis}
\begin{theorem}
    Let \( \alpha < \mathrm{Ord} \cap M \), and let \( \kappa = (\aleph_\alpha)^M \).
    Let \( \mathbb P = \Fn(\kappa \times \omega, 2) \), and let \( G \) be \( \mathbb P \)-generic over \( M \).
    Then \( M[G] \) contains a \( \kappa \)-length sequence of distinct elements of \( 2^\omega \).
    Hence, \( M[G] \vDash \mathsf{ZFC} + (\aleph_\alpha = \kappa \leq 2^{\aleph_0}) \).
\end{theorem}
\begin{proof}
    Let \( f = \bigcup G \in M[G] \).
    Then \( f \) is a function \( \kappa \times \omega \to 2 \).
    For \( \beta < \kappa \), let \( g_\beta : \omega \to 2 \) be the function given by \( g_\beta(n) = f(\beta, n) \).
    We claim that for \( \alpha \neq \beta \), we have \( g_\alpha \neq g_\beta \).
    Define a dense set \( E_{\alpha,\beta} \in M \) as follows.
    \[ E_{\alpha,\beta} = \qty{q \in \mathbb P \mid \exists n.\, \langle \beta, n \rangle, \langle \alpha, n \rangle \in \dom q \wedge q(\langle \beta, n\rangle) \neq q(\langle \alpha, n \rangle)} \]
    To show this is dense, fix \( p \in \mathbb P \).
    Since \( p \) is finite, there is some \( m \) such that \( \langle \beta, m \rangle, \langle \alpha, m \rangle \notin \dom p \).
    Define \( q \leq p \) with \( q : \dom p \cup \qty{\langle \beta, m \rangle, \langle \alpha, m \rangle} \to 2 \) by
    \[ q(z) = \begin{cases}
        p(z) & \text{if } z \in \dom p \\
        1 & \text{if } z = \langle \beta, m \rangle \\
        0 & \text{if } z = \langle \alpha, m \rangle
    \end{cases} \]
    Since \( G \) is \( \mathbb P \)-generic, we can fix \( q' \in G \cap E_{\alpha,\beta} \).
    Then
    \[ g_\beta(m) = f(\beta, m) = q(\langle \beta, m \rangle) \neq q(\langle \alpha, m \rangle) = f(\alpha, m) = g_\alpha(m) \]
    Hence \( g_\alpha \neq g_\beta \).
    Finally, since \( \mathbb P \) has the countable chain condition in \( M \), it preserves cardinals, so it preserves the \( \aleph \) hierarchy.
\end{proof}
In particular, if \( \alpha = 2 \), the model \( M[G] \) satisfies \( \neg\mathsf{CH} \).
\begin{theorem}
    If \( \mathsf{ZFC} \) is consistent, then so is \( \mathsf{ZFC} + \neg\mathsf{CH} \).
\end{theorem}
The proof proceeds in the same way as the independence of \( \mathrm{V} = \mathrm{L} \).
\begin{definition}
    The \( g_\beta \) defined above are called \emph{Cohen reals}.
    More precisely, we say that \( c : \omega \to 2 \) is a Cohen real over \( M \) if there exists \( H \) which is \( \Fn(\omega, 2) \)-generic over \( M \) and \( c = \bigcup H \).
\end{definition}

\subsection{Possible sizes of the continuum}
We have a way to add Cohen reals into a model \( M \), but in general this process will add many more reals.
In this subsection, we determine the possible sizes that the continuum can be.
Recall that by K\"onig's theorem, \( 2^{\aleph_0} \neq \kappa \) for any \( \kappa \) with cofinality \( \aleph_0 \).
We will show that this is the only restriction on the possible sizes of the continuum.
Note that under \( \mathsf{GCH} \), for any \( \kappa \), \( \cf(\kappa) \neq \omega \) if and only if \( \kappa^\omega = \kappa \).

Recall that in our proof that the axiom of power set holds in \( M[G] \), given a name \( \dot a \in M^{\mathbb P} \), the set \( \mathcal P(\mathbb P \times \ran \dot a) \) is a name for its power set.
We will show that there is a better name that gives a tighter bound on the sizes of power sets.
\begin{theorem}
    Let \( M \) be a transitive model of \( \mathsf{ZFC} \), and assume \( (\kappa = \aleph_\alpha \wedge \kappa^\omega = \kappa)^M \).
    Let \( \mathbb P = \Fn(\kappa \times \omega, 2) \), and let \( G \) be \( \mathbb P \)-generic over \( M \).
    Then \( M[G] \vDash 2^{\aleph_0} = \aleph_\alpha = \kappa \).
\end{theorem}
\begin{proof}
    We have already shown that \( M[G] \vDash \mathsf{ZFC} \) and \( M[G] \vDash \kappa = \aleph_\alpha \leq 2^{\aleph_0} \); it therefore remains to show that \( 2^{\aleph_0} \leq \aleph_\alpha \).
    Let \( \dot x \) be a name for a subset of \( \omega \).
    For \( n \in \omega \), let
    \[ E_{\dot x, n} = \qty{p \in \mathbb P \mid (p \Vdash \check n \in \dot x) \vee (p \Vdash \check n \notin \dot x)} \]
    This is dense in \( \mathbb P \).
    For each \( n \in \omega \), choose a maximal antichain \( A_{\dot x, n} \subseteq E_{\dot x, n} \).
    This is shown to be possible on an example sheet using the axiom of choice.
    Define
    \[ \dot z_{\dot x} = \bigcup_{n \in \omega} \qty{\langle p, \check n \rangle \mid p \in A_{\dot x, n} \wedge p \Vdash \check n \in \dot x} \]
    Such names are called \emph{nice}.
    We will show that \( \dot z_{\dot x} \) and \( \dot x \) are both names for the same subset of \( \omega \), and since we can produce a bound on the amount of nice names, we can bound the size of \( 2^{\aleph_0} \).

    We claim that \( \Bbbone \Vdash \dot x = \dot z_{\dot x} \).
    To do this, it suffices to prove that for all \( n \in \omega \),
    \[ D_{\dot x, n} = \qty{q \in E_{\dot x, n} \mid (q \Vdash \check n \in \dot x) \leftrightarrow (q \Vdash \check n \in \dot z_{\dot x})} \]
    is dense.
    Fix \( n \in \omega \) and \( p \in \mathbb P \).
    Since \( E_{\dot x, n} \) is dense, we can fix \( p_0 \leq p \) such that \( p_0 \in E_{\dot x, n} \).
    As \( A_{\dot x, n} \) is a maximal antichain, there is \( q_0 \in A_{\dot x, n} \) such that \( p_0 \mathrel\| q_0 \).
    Fix \( r \leq p_0, q_0 \).
    We will prove that \( r \in D_{\dot x, n} \).
    If \( r \Vdash \check n \in \dot x \), then \( q_0 \Vdash \check n \in \dot x \) as \( q_0 \in E_{\dot x, n} \).
    Hence, \( \langle q_0, \check n \rangle \in \dot z_{\dot x} \) by definition, so \( r \Vdash \check n \in \dot z_{\dot x} \).
    For the converse, suppose \( r \Vdash \check n \in \dot z_{\dot x} \).
    By definition,
    \[ \qty{s \leq r \mid \exists \langle q_1, \check m \rangle \in \dot z_{\dot x}.\, s \leq q_1 \wedge (s \Vdash \check m = \check n)} \]
    is dense below \( r \).
    This can only happen if there is some \( q_1 \) with \( \langle q_1, \check n \rangle \in \dot z_{\dot x} \) such that \( r \mathrel\| q_1 \).
    Therefore, by definition, \( q_1 \in A_{\dot x, n} \).
    Since \( A_{\dot x, n} \) is an antichain containing \( q_0 \) and \( q_1 \) which are both compatible with \( r \), we must have \( q_0 = q_1 \).
    Hence, \( \langle q_0, \check n \rangle \in \dot x_{\dot x} \).
    Thus \( q_0 \Vdash \check n \in \dot x \) by definition, so since \( r \leq q_0 \), we have \( r \Vdash \check n \in \dot x \).
    Therefore \( D_{\dot x, n} \) is dense as required.

    The total number of subsets of \( \omega \) is therefore bounded by the number of nice names.
    First, note that \( \abs{\mathbb P} = \kappa \).
    Furthermore, since \( \mathbb P \) has the countable chain condition, each \( A_{\dot x, n} \) is countable.
    Therefore, the amount of nice names is bounded by \( (\kappa^\omega \times \omega)^\omega = \kappa \).
    As every subset of \( \omega \) has a nice name, \( M[G] \vDash 2^{\aleph_0} \leq \kappa \).
\end{proof}
\begin{corollary}
    \( \Con(\mathsf{ZFC}) \) implies \( \Con(\mathsf{ZFC} + (2^{\aleph_0} = \aleph_2)) \), and (for example) \( \Con(\mathsf{ZFC} + (2^{\aleph_0} = \aleph_{\omega_1})) \).
\end{corollary}
\begin{corollary}
    The following are equiconsistent.
    \begin{enumerate}
        \item \( \mathsf{ZFC} + \text{there exists a weakly inaccessible cardinal} \);
        \item \( \mathsf{ZFC} + \mathsf{GCH} + \text{there exists a strongly inaccessible cardinal} \);
        \item \( \mathsf{ZFC} + 2^{\aleph_0} \text{ is weakly inaccessible} \);
        \item \( \mathsf{ZFC} + \text{there exists a cardinal that is weakly inaccessible but not strongly inaccessible} \).
    \end{enumerate}
\end{corollary}
\begin{proof}
    To show (i) implies (ii) we move to \( \mathrm{L} \).
    To show (iii) implies (iv), we note that \( 2^{\aleph_0} \) is not strongly inaccessible.
    It is trivial that (iv) implies (i).
    It therefore suffices to show that the continuum can be weakly inaccessible given (ii), which follows by considering the forcing \( \mathbb P = \Fn(\kappa \times \omega, 2) \).
\end{proof}
\begin{remark}
    When building models of \( \mathsf{ZFC} + (2^{\aleph_0} = \kappa) \), we often assume \( \mathsf{GCH} \) for convenience.
    This can normally be done without loss of generality because we are usually only concerned with consistency results.
\end{remark}
\begin{example}
    Consider \( \mathbb P = \Fn(\aleph_\omega^M \times \omega, 2) \).
    Let \( G \) be a \( \mathbb P \)-generic filter.
    Then in \( M[G] \), we must have \( 2^{\aleph_0} \geq \aleph_\omega \).
    By K\"onig's theorem, this inequality must be strict.
    For convenience, assume \( \mathsf{GCH} \) holds.
    Under this assumption, if \( \cf(\kappa) = \omega \), then \( \kappa^\omega = \kappa^+ \), so there must be at most \( \kappa^+ \)-many nice names.
    Hence \( M[G] \vDash \aleph_\omega < 2^{\aleph_0} \leq \aleph_\omega^+ \) which gives \( M[G] \vDash 2^{\aleph_0} = \aleph_{\omega + 1} \).
\end{example}
\begin{remark}
    \begin{enumerate}
        \item Note that it is possible that \( 2^{\aleph_0} < \aleph_\omega \) but \( \aleph_\omega^{\aleph_0} = \aleph_{\omega + 1}^{\aleph_0} = \aleph_{\omega + 2} \) without \( \mathsf{GCH} \).
        This can be proven using large cardinals.
        \item If \( M \vdash 2^{\aleph_0} = \aleph_\alpha > \aleph_\beta \) and \( \mathbb P = \Fn(\aleph_\beta^M \times \omega, 2) \), then \( M[G] \vDash 2^{\aleph_0} = \aleph_\alpha \).
        \item The following are equiconsistent.
        \begin{enumerate}
            \item \( \mathsf{ZFC} + \text{there exists a measurable cardinal} + \mathsf{CH} \);
            \item \( \mathsf{ZFC} + \text{there exists a measurable cardinal} + \neg\mathsf{CH} \).
        \end{enumerate}
        The same holds for other large cardinal axioms such as huge cardinals and \( I0 \) to \( I3 \).
        We may also replace \( \mathsf{CH} \) with \( \mathsf{GCH} \) and the same holds.
        \item The \emph{proper forcing axiom}, which is a combinatorial axiom about forcing posets, implies that \( 2^{\aleph_0} = \aleph_2 \) under \( \mathsf{ZFC} \).
    \end{enumerate}
\end{remark}

\subsection{Larger chain conditions}
We now discuss generalised Cohen forcing.
Suppose that we want a model of \( \mathsf{ZFC} + \mathsf{CH} + (2^{\aleph_1} = \aleph_3) \).
Na\"ively, we might consider the forcing poset \( \Fn(\omega_3 \times \omega_1, 2) \), but we can show that \( \mathsf{CH} \) fails in this model.
\begin{proposition}
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} + \mathsf{GCH} \), and let \( (\kappa = \aleph_\alpha \wedge \kappa^\omega = \kappa)^M \).
    Let \( \mathbb P = \Fn(\kappa \times \omega, 2) \).
    Then, for any cardinal \( \lambda \) in \( M \) such that \( \aleph_0 \leq \lambda < \kappa \), then in \( M[G] \) we have
    \[ 2^\lambda = \begin{cases}
        \kappa & \text{if } \cf \kappa > \lambda \\
        \kappa^+ & \text{if } \cf \kappa \leq \lambda
    \end{cases} \]
\end{proposition}
There is a natural bijection between \( \omega_3 \times \omega \) and \( \omega_3 \times \omega_1 \), and from this it will follow that \( 2^{\aleph_0} = 2^{\aleph_1} = \aleph_3 \).
\begin{definition}
    Let \( I, J \) be sets and let \( \kappa \) be a regular cardinal.
    Define \( \Fn_\kappa(I, J) \) to be the partial functions \( I \to J \) of size less than \( \kappa \).
    Its maximal element is \( \varnothing \) under the order \( q \leq p \) if and only if \( p \subseteq q \).
\end{definition}
\begin{remark}
    \begin{enumerate}
        \item \( \Fn_\omega(I, J) = \Fn(I, J) \).
        \item The reason that \( \Fn(I, J) \) was absolute is that finite objects are absolute.
        In general, \( \Fn_\kappa(I, J) \) is not absolute.
        Moreover, if \( M \) is a countable transitive model, then \( \Fn_\kappa(I, J) \notin M \).
        We instead need to consider the relativisation \( (\Fn_\kappa(I, J))^M \).
        \item If \( \kappa > \omega \) and \( I, J \neq \varnothing \), \( \Fn_\kappa(I, J) \) does not have the countable chain condition.
        \item If \( G \) is \( \Fn_\kappa(I, J) \)-generic over \( M \), then \( f = \bigcup G \) is a function \( I \to J \).
    \end{enumerate}
\end{remark}
Let \( \mathbb P = \Fn_\kappa(\lambda \times \kappa, 2) \) where \( \lambda \geq \kappa \) and \( \kappa \) is regular.
Suppose also that \( \lambda^\kappa = \lambda \).
By a similar argument to the \( \omega \) case, if \( f = \bigcup G \) and \( h_\alpha : \kappa \to 2 \) is defined by \( h_\alpha(\beta) = f(\alpha, \beta) \), then this gives a sequence of \( \lambda \)-many distinct functions \( \kappa \to 2 \).
Similarly, by the nice names argument, there are precisely \( \lambda \)-many functions \( \kappa \to 2 \) because \( \lambda^\kappa = \lambda \).
We need to explicitly check that we have preserved all cardinals, using a generalisation of the countable chain condition.
Once we have shown this, we will obtain \( M[G] \vDash 2^\kappa = \lambda \).
\begin{definition}
    For a cardinal \( \kappa \), we say that \( \mathbb P \) has the \emph{\( \kappa \)-chain condition} if every antichain has cardinality less than \( \kappa \).
\end{definition}
The countable chain condition is equivalent to the \( \aleph_1 \)-chain condition.
All of the proofs above immediately generalise to the \( \kappa \)-chain condition.
\begin{definition}
    We say that \( \mathbb P \) \emph{preserves cofinalities above \( \kappa \)} if and only if for all \( \mathbb P \)-generic filters \( G \) and limit ordinals \( \gamma \in \mathrm{Ord} \cap M \) with \( \cf^M(\gamma) \geq \kappa \), we have \( \cf^M(\gamma) = \cf^{M[G]}(\gamma) \).
\end{definition}
\begin{lemma}
    Let \( \mathbb P \in M \) be a forcing poset and \( (\kappa \text{ is regular})^M \).
    Then
    \begin{enumerate}
        \item \( \mathbb P \) preserves cofinalities above \( \kappa \) if and only if for all \( \mathbb P \)-generic filters \( G \) and all limit ordinals \( \beta \) with \( \kappa \leq \beta \in \mathrm{Ord} \cap M \), we have \( (\beta \text{ is regular})^M \to (\beta \text{ is regular})^{M[G]} \);
        \item \( \mathbb P \) preserves cofinalities above \( \kappa \) if and only if \( \mathbb P \) preserves cardinals at least \( \kappa \).
    \end{enumerate}
\end{lemma}
\begin{lemma}
    Let \( A, B, \mathbb P \in M \), let \( (\kappa \text{ is regular})^M \), let \( (\mathbb P \text{ has the } \kappa \text{-chain condition})^M \), and let \( G \) be a \( \mathbb P \)-generic filter over \( M \).
    Then for any \( f : A \to B \) in \( M[G] \), there is \( F : A \to \mathcal P(B) \) in \( M \) such that for all \( a \in A \), we have \( f(a) \in F(a) \) and \( (\abs{F(a)} \leq \kappa)^M \).
\end{lemma}
\begin{theorem}
    Let \( \mathbb P \in M \) be a forcing poset, let \( (\kappa \text{ is regular})^M \), let \( (\mathbb P \text{ has the } \kappa \text{-chain condition})^M \).
    Then \( \mathbb P \) preserves cofinalities above \( \kappa \), and hence cardinals at least \( \kappa \).
\end{theorem}
On the example sheet, we show that for any infinite cardinal \( \kappa \), \( \Fn_\kappa(I, J) \) has the \( (\abs{J}^{<\kappa})^+ \)-chain condition.
In particular, \( \Fn_\kappa(\lambda \times \kappa, 2) \) has the \( (2^{<\kappa})^+ \)-chain condition.
We will show a different version of this theorem.
\begin{lemma}
    Let \( \kappa \) be a regular cardinal in \( M \), and suppose that \( (2^{<\kappa} = \kappa)^M \).
    Then, if \( (1 \leq \abs{J} \leq 2^{<\kappa})^M \), the forcing poset \( \mathbb P = \Fn_\kappa(I, J)^M \) has the \( \kappa^+ \)-chain condition.
\end{lemma}
\begin{proof}
    If \( I \) is empty, the result is trivial, so we may assume \( I \) is nonempty.
    Let \( W \) be an antichain in \( \mathbb P \).
    To show that \( \abs{W} \leq \kappa \), we will construct chains \( (A_\alpha)_{\alpha < \kappa} \) in \( I \) and \( (W_\alpha)_{\alpha \in \kappa} \) such that
    \begin{enumerate}
        \item for all \( \alpha < \beta < \kappa \), we have \( A_\alpha \subseteq A_\beta \subseteq I \) and \( W_\alpha \subseteq W_\beta \subseteq W \);
        \item for limit ordinals \( \gamma \), we have \( A_\gamma = \bigcup_{\beta < \gamma} A_\beta \) and \( W_\gamma = \bigcup_{\beta < \gamma} W_\beta \);
        \item \( W = \bigcup_{\alpha < \kappa} W_\alpha \);
        \item for all \( \alpha < \kappa \), \( \abs{A_\alpha} \leq \kappa \) and \( \abs{W_\alpha} \leq \kappa \).
    \end{enumerate}
    The result then follows by regularity of \( \kappa^+ \).
    Set \( A_0 = W_0 = \varnothing \).
    It remains to define successor cases.
    Suppose we have constructed \( A_\alpha, W_\alpha \).
    For each \( p \in \mathbb P \) with \( \dom p \subseteq A_\alpha \), using the axiom of choice we choose \( q_p \in W \) such that \( p = \eval{q_p}_{A_\alpha} \), if it exists.
    Note that if \( \dom p \subseteq A_\beta \) for any \( \beta < \alpha \), we will choose \( q_p \) to coincide with the \( q_p \) chosen at stage \( \beta \).
    Then define
    \[ W_{\alpha + 1} = W_\alpha \cup \qty{q_p \mid \dom p \subseteq A_\alpha} \]
    and
    \[ A_{\alpha + 1} = \bigcup \qty{\dom q \mid q \in W_{\alpha + 1}} \]
    Finally, set \( A = \bigcup_{\alpha < \kappa} A_\alpha \).

    We claim that \( W = \bigcup_{\alpha < \kappa} W_\alpha \).
    By construction, we have \( \bigcup_{\alpha < \kappa} W_\alpha \subseteq W \).
    For any \( q \in W \), note that \( \dom q \cap A \neq \varnothing \), otherwise take \( q_1 \in W_1 \), and \( \dom q_1 \subseteq A \), so if \( \dom q_1 \cap \dom q = \varnothing \), then \( q_1 \mathrel\| q \), contradicting \( q_1, q \in W \).
    Since \( \dom q \cap A = \varnothing \) and \( \abs{\dom q} < \kappa \), we must have \( \dom q \cap A = \dom q \cap A_\alpha \) for some \( \alpha < \kappa \).
    Define \( p = \eval{q}_{A_\alpha} \).
    By definition, there is some \( q' \in W_{\alpha + 1} \) such that \( \eval{q'}_{A_\alpha} = p \).
    Since \( \dom q' \subseteq A \), we have \( q \mathrel\| q' \).
    As \( W \) is an antichain, this is only possible if \( q = q' \), so \( q \in \bigcup_{\alpha < \kappa} W_\alpha \).

    We now show that for all \( \alpha < \kappa \), the sets \( W_\alpha \) and \( A_\alpha \) have size at most \( \kappa \).
    We show this by induction on \( \alpha \).
    The result for limit cases follows from regularity.
    If \( \abs{W_{\alpha + 1}} \leq \kappa \), then clearly \( \abs{A_{\alpha + 1}} \leq \kappa \), so it remains to show \( \abs{W_{\alpha + 1}} \leq \kappa \).
    Since every condition \( q \) that is added to \( W_\alpha \) is chosen from some condition \( p \) with \( \dom p \subseteq A_\alpha \), then
    \[ \abs{W_{\alpha + 1}} \leq \abs{W_\alpha} + \abs{\qty{p \in \mathbb P \mid \dom p \subseteq A_\alpha}} \]
    As \( \abs{A_\alpha} \leq \kappa \) and \( \abs{\dom p} < \kappa \), then
    \[ \abs{[A_\alpha]^{<\kappa}} \leq \kappa^{<\kappa} = 2^{<\kappa} = \kappa \]
    Hence \( \abs{W_{\alpha + 1}} \leq \kappa \) as required.
\end{proof}
Hence, if \( \mathbb P = \Fn_\kappa(\lambda \times \kappa, 2) \), then \( M[G] \vDash 2^\kappa = \lambda \) and all cardinals at least \( \kappa^+ \) are preserved.

\subsection{Closure and distributivity}
\begin{definition}
    A poset \( \mathbb P \) is \emph{\( <\kappa \)-closed} if for every \( \delta < \kappa \), every decreasing sequence of length \( \delta \) in \( \mathbb P \) has a lower bound.
\end{definition}
\begin{definition}
    \( \mathbb P \) is \emph{\( <\kappa \)-distributive} if the intersection of less than \( \kappa \)-many open dense sets is an open dense set.
\end{definition}
\begin{lemma}
    If \( \mathbb P \) is \( <\kappa \)-closed then \( \mathbb P \) is \( <\kappa \)-distributive.
\end{lemma}
\begin{lemma}
    If \( \kappa \) is regular in \( M \), then \( \Fn_\kappa(I, J)^M \) is \( <\kappa \)-closed.
\end{lemma}
\begin{theorem}
    Let \( A, B, \mathbb P \in M \), let \( \kappa \) be a cardinal in \( M \) with \( (\abs{A} < \kappa)^M \), and suppose \( \mathbb P \) is \( \kappa \)-distributive in \( M \).
    Let \( G \) be \( \mathbb P \)-generic.
    Then if \( f \in M[G] \) with \( f : A \to B \), then \( f \in M \).
\end{theorem}
Informally, forcing over a distributive poset cannot add any new small functions.
\begin{proof}
    It suffices to prove the statement for \( A = \delta \) where \( \delta < \kappa \).
    Suppose that \( M[G] \vDash f : \delta \to B \).
    By the forcing theorem, there is \( p \in G \) such that \( p \Vdash \dot f : \check \delta \to \check B \).
    For \( \alpha < \delta \), let
    \[ D_\alpha = \qty{q \leq p \mid \exists x \in B .\, q \Vdash \dot f(\check \alpha) = \check x} \]
    These sets are clearly open, and they are dense below \( p \) because \( p \) forces that \( \dot f \) is a function.
    Since \( \mathbb P \) is \( <\kappa \)-distributive, their intersection \( D = \bigcap_{\alpha < \delta} D_\alpha \) is also (open and) dense below \( p \).
    Let \( q \in D \cap G \).
    Now, in \( M \), for each \( \alpha < \delta \), we can choose \( x_\alpha \in B \) such that \( q \Vdash \dot f(\check \alpha) = \check x_\alpha \), so we may define \( g : \delta \to B \) by \( \alpha \mapsto x_\alpha \).
    This \( g \) lies in \( M \).
    But for any \( \alpha < \delta \), we have \( q \Vdash \dot f(\check \alpha) = \check x_\alpha = \check g(\check \alpha) \), so \( M[G] \vDash f = g \).
\end{proof}
\begin{theorem}
    Let \( I, J, \kappa \in M \).
    Suppose that \( \kappa \) is a regular cardinal in \( M \), and \( (2^{<\kappa} = \kappa \wedge \abs{J} \leq \kappa)^M \).
    Then \( \Fn_\kappa(I, J)^M \) preserves cofinalities and hence cardinals.
\end{theorem}
\begin{proof}
    Recall that it suffices to show that for every limit ordinal \( \beta \in \mathrm{Ord} \cap M \), if \( \beta \) is regular in \( M \) then \( \beta \) is regular in \( M[G] \).
    Let \( \beta \) be regular in \( M \).

    Suppose that \( \beta > \kappa \).
    Since \( \abs{J} \leq \kappa = 2^{<\kappa} \) in \( M \), the forcing poset \( \Fn_\kappa(I, J)^M \) has the \( \kappa^+ \)-chain condition.
    So it preserves all cofinalities and cardinals at least \( \kappa^+ \), so in particular, \( \beta \) is regular in \( M[G] \).

    Now suppose that \( \beta \leq \kappa \).
    Suppose that \( \beta \) is singular in \( M[G] \).
    Fix \( \delta < \beta \) and a cofinal map \( f : \delta \to \beta \) in \( M[G] \).
    Note that \( \delta \in M \).
    Since \( \mathbb P \) is \( \kappa \)-closed, it is \( \kappa \)-distributive, so \( f \in M \), contradicting the assumption that \( \beta \) is regular in \( M \).
\end{proof}
\begin{theorem}
    Let \( \kappa, \lambda \) be cardinals in \( M \) such that \( \aleph_0 \leq \kappa \leq \lambda \).
    Suppose that \( \kappa \) is regular, \( 2^{<\kappa} = \kappa \), and \( \lambda^\kappa = \lambda \) in \( M \).
    Let \( \mathbb P = \Fn_\kappa(\lambda \times \kappa, 2) \), and let \( G \) be \( \mathbb P \)-generic.
    Then \( \mathbb P \) preserves cardinals, and \( M[G] \vDash 2^\kappa = \lambda \).
\end{theorem}
We can use this to fix multiple sizes of power sets at once.
\begin{theorem}
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} + \mathsf{GCH} \).
    Then there is a countable transitive model of \( \mathsf{ZFC} \) satisfying any of the following statements.
    \begin{enumerate}
        \item \( \mathsf{CH} + 2^{\aleph_1} = \aleph_3 \);
        \item \( 2^{\aleph_0} = 2^{\aleph_1} = \aleph_5 \) and \( 2^{\aleph_2} = \aleph_{\omega + 5} \);
        \item for a fixed \( n \in \omega \), for all \( m \leq n \), \( 2^{\aleph_m} = \aleph_{2m + 3} \).
    \end{enumerate}
\end{theorem}
\begin{proof}
    \emph{Part (i).}
    Let \( \mathbb P = \Fn_{\aleph_1}(\omega_3 \times \omega_1, 2)^M \).
    If \( G \) is \( \mathbb P \)-generic, then \( M[G] \vDash 2^{\aleph_1} = \aleph_3 \).
    As \( \mathbb P \) is \( \omega_1 \)-closed, it does not add any new functions \( \omega \to 2 \), so \( \mathsf{CH} \) still holds in \( M[G] \).

    \emph{Part (ii).}
    Let \( \mathbb P_0 = \Fn_{\aleph_2}(\omega_{\omega + 5} \times \omega_2, 2)^M \).
    Let \( G_0 \) be \( \mathbb P_0 \)-generic.
    By closure, \( 2^{<\aleph_1} = \aleph_1 \) in \( M[G_0] \), and \( {\aleph_5}^{\aleph_1} = \aleph_5 \).
    Then let \( \mathbb P_1 = \Fn_{\aleph_0}(\omega_5 \times \omega, 2)^{M[G_0]} \).
    Let \( G_1 \) be \( \mathbb P_1 \)-generic.
    Then \( M[G_1] \vDash 2^{\aleph_0} = 2^{\aleph_1} = \aleph_5 \), where the latter equality is due to the fact that if \( M \) is a model of \( \mathsf{ZFC} + \mathsf{GCH} \) and \( G \) is \( \Fn(\kappa \times \omega, 2) \)-generic, then for any cardinal \( \lambda \in M \) with \( \aleph_0 \leq \lambda < \kappa \), the value of \( 2^\lambda \) in \( M[G] \) is \( \kappa \) if \( \cf(\kappa) > \lambda \) and \( \kappa^+ \) if \( \cf(\kappa) \leq \lambda \).
    Also, \( M[G_1] \vDash 2^{\aleph_2} = \aleph_{\omega + 5} \) by preservation of cardinals.

    Part (iii) is similar; we first make \( 2^{\aleph_m} = \aleph_{2m+3} \), then make \( 2^{\aleph_{m-1}} = \aleph_{2(m-1)+3} \), and continue downwards.
\end{proof}
\begin{remark}
    \begin{enumerate}
        \item It is necessary to start at the largest cardinal and work downwards; this ensures that the cardinal arithmetic in our forcing models remains correct.
        \item The iterative approach works for any finite number of cardinals.
        We will see later how we can force \( 2^{\aleph_n} = \aleph_{2n + 3} \) for all \( n \in \omega \).
    \end{enumerate}
\end{remark}
We give an example to show that the order described in (i) is necessary.
\begin{proposition}
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} \) with \( M \vDash 2^{\aleph_0} = \aleph_\alpha \).
    Let \( \mathbb P = \Fn_{\aleph_1}(\kappa \times \aleph_1, 2) \) for some \( \kappa \geq 1 \).
    Then if \( G \) is \( \mathbb P \)-generic, \( M[G] \vDash \mathsf{CH} \), and all cardinals \( \delta \) of \( M \) with \( \aleph_1 \leq \delta \leq \aleph_\alpha \) in \( M \) are no longer cardinals in \( M[G] \).
    In particular, \( \aleph_\alpha^M \neq \aleph_\alpha^{M[G]} \).
\end{proposition}
This is on the example sheets.

\subsection{The mixing lemma}
Recall that \( p \Vdash \exists x.\, \varphi(x) \) if and only if
\[ \qty{q \leq p \mid \exists \dot x \in \mathrm{V}^{\mathbb P}.\, q \Vdash \varphi(\dot x)} \]
is dense below \( p \).
In most cases, the witness \( \dot x \) does not depend on \( G \).
For example, in \( p \Vdash \exists x.\, (\dot a \in x \wedge \dot b \in x) \), we can find a name \( \dot x = \operatorname{op}(\dot a, \dot b) \) without needing to know \( G \).
Informally, the mixing lemma says that this is always the case, as long as \( M \) has \( \mathsf{AC} \).
\begin{theorem}[the mixing lemma]
    (\( \mathsf{ZFC} \))
    Suppose that \( (p \Vdash \exists x.\, \varphi(x))^M \).
    Then there is a name \( \dot x \in M^{\mathbb P} \) such that \( (p \Vdash \varphi(\dot x))^M \).
\end{theorem}
\begin{proof}
    Since
    \[ \qty{q \leq p \mid \exists \dot x \in M^{\mathbb P}.\, q \Vdash \varphi(\dot x)} \]
    is dense below \( p \), it contains a maximal antichain \( D \).
    Now, for each \( q \in D \), choose some \( \dot x_q \) such that \( q \Vdash \varphi(\dot x_q) \).
    Without loss of generality, we may assume that if \( \langle r, \dot y \rangle \in \dot x_q \), then \( r \leq q \).
    This is because
    \begin{enumerate}
        \item if \( r \perp q \), then \( q \Vdash \dot x_q = (\dot x_q \setminus \langle r, \dot y \rangle) \); and
        \item if \( r \mathrel\| q \), then define
        \[ \dot x_q' = (\dot x_q \setminus \langle r, \dot y \rangle) \cup \qty{\langle s, \dot y \rangle \mid s \leq r, q} \]
        so \( q \Vdash \dot x_q = \dot x_q' \).
    \end{enumerate}
    Now, if \( q, q' \in D \) are such that \( q \neq q' \), we must have \( q \perp q' \) as \( D \) is an antichain.
    So \( q' \Vdash \dot x_q = \varnothing \).
    We `mix' the \( \dot x_q \) together to form
    \[ \dot x = \bigcup \qty{\dot x_q \mid q \in D} \]
    Then if \( q \in D \), we have \( q \Vdash \dot x = \dot x_q \).
    By the forcing theorem, \( q \Vdash \varphi(\dot x) \).

    It remains to show that \( p \Vdash \varphi(\dot x) \).
    Suppose otherwise, so there is \( r \leq p \) such that \( r \Vdash \neg\varphi(\dot x) \).
    As \( D \) is a maximal antichain of conditions below \( p \), there is a condition \( q \in D \) such that \( q \mathrel\| r \).
    Now if \( s \leq q, r \), we have \( s \Vdash \varphi(\dot x) \) and \( s \Vdash \neg\varphi(\dot x) \), giving a contradiction.
\end{proof}

\subsection{Forcing successor cardinals}
We would now like to find generic filters that collapse \( \kappa < \lambda \) such that \( \kappa = \lambda^+ \).
Observe that this can only happen if \( \lambda \) is regular in \( M \).
This is because if \( f : \alpha \to \lambda \) is cofinal with \( \alpha < \lambda \) and \( f \in M \), then \( f \in M[G] \), so
\[ \cf^{M[G]}(\lambda) \leq \cf^{M[G]}(\alpha) \leq \abs{\alpha}^{M[G]} < \lambda \]
We will show that this is the only restriction.
\begin{theorem}
    Let \( \kappa \) be a regular cardinal in \( M \), and let \( \delta > \kappa \) be a cardinal in \( M \).
    Let \( \lambda = \delta^+ \) in \( M \).
    Let \( G \) be \( \Fn_\kappa(\kappa, \delta) \)-generic over \( M \).
    Then in \( M[G] \),
    \begin{enumerate}
        \item \( \abs{\delta} = \kappa \);
        \item every cardinal \( \alpha \leq \kappa \) in \( M \) remains a cardinal in \( M[G] \);
        \item if \( \delta^{<\kappa} = \delta \) then every cardinal \( \alpha > \delta \) in \( M \) remains a cardinal in \( M[G] \).
    \end{enumerate}
    In particular, if \( \delta^{<\kappa} = \delta \), then \( M[G] \vDash \lambda = \kappa^+ \).
\end{theorem}
Observe that if \( \delta \) is a cardinal in \( M \) and \( \delta > \abs{\mathbb P} \) in \( M \), then \( \delta \) remains a cardinal in \( M[G] \).
This is because \( \mathbb P \) has the \( \abs{\mathbb P}^+ \)-chain condition.
\begin{proof}
    \emph{Part (i).}
    Note that \( \bigcup G : \kappa \to \delta \) is a surjection, so \( \abs{\delta} = \abs{\kappa} \) in \( M[G] \).
    In particular, there are no cardinals between \( \delta \) and \( \lambda \).

    \emph{Part (ii).}
    Since \( \kappa \) is regular, \( \Fn_\kappa(\kappa,\delta) \) is \( <\kappa \)-closed, so every cardinal \( \alpha \leq \kappa \) is preserved.

    \emph{Part (iii).}
    Finally, if \( \delta^{<\kappa} = \delta \), then \( \abs{\Fn_\kappa(\kappa,\delta)} = \delta \), so \( \Fn_\kappa(\kappa,\delta) \) has the \( \delta^+ \)-chain condition, so every cardinal \( \alpha > \delta \) (in particular, \( \lambda \)) is preserved.
\end{proof}
Now suppose that \( \lambda \) is weakly inaccessible.
In this case, we will use a forcing poset called the \emph{L\'evy collapse}.
\begin{definition}
    Let \( \lambda > \kappa \) be infinite ordinals.
    Then \( \operatorname{Col}(\kappa,<\lambda) \) consists of all functions \( p \) such that
    \begin{enumerate}
        \item \( p \) is a partial function from \( \kappa \times \lambda \to \lambda \);
        \item \( \abs{\dom p} < \kappa \);
        \item \( p(\alpha, \beta) < \beta \) for each \( (\alpha, \beta) \in \dom p \).
    \end{enumerate}
    We make this into a forcing poset by writing \( q \leq p \) if and only if \( q \) extends \( p \) as a function.
\end{definition}
Informally, for each \( \beta < \lambda \), we add a surjection \( \kappa \to \beta \).
\begin{theorem}[L\'evy]
    Let \( \kappa \) be a regular cardinal in \( M \), and suppose \( \lambda > \kappa \) is strongly inaccessible in \( M \).
    Let \( G \) be \( \operatorname{Col}(\kappa, <\lambda) \)-generic over \( M \).
    Then in \( M[G] \),
    \begin{enumerate}
        \item every ordinal \( \beta \) with \( \kappa \leq \beta < \lambda \) has cardinality \( \kappa \); and
        \item every cardinal at most \( \kappa \) or at least \( \lambda \) remains a cardinal.
    \end{enumerate}
    In particular, \( M[G] \vDash \lambda = \kappa^+ \).
\end{theorem}
\begin{proof}
    If \( \beta < \lambda \), we can define \( G_\beta : \kappa \to \beta \) by \( G_\beta(\alpha) = \qty(\bigcup G)(\alpha, \beta) \).
    By density, this is a surjection, so if \( \kappa \leq \beta < \lambda \), we have \( M[G] \vDash \abs{\beta} = \abs{\kappa} \).

    Note that \( \operatorname{Col}(\kappa, <\lambda) \) is \( <\kappa \)-closed, so preserves cardinals at most \( \kappa \).
    In particular, \( \kappa \) remains a cardinal.

    Now, \( \abs{\operatorname{Col}(\kappa, <\lambda)} = \lambda \).
    Therefore, \( \operatorname{Col}(\kappa, <\lambda) \) has the \( \lambda^+ \)-chain condition and therefore preserves cardinals at least \( \lambda^+ \).

    % TODO: We can get rid of the previous paragraph because the lambda-cc is stronger
    Finally, we show that \( \lambda \) is still a cardinal in \( M[G] \), which follows from the \( \lambda \)-chain condition.
    Given \( p \in \operatorname{Col}(\kappa, <\lambda) \), define the \emph{support} of \( p \) to be
    \[ \operatorname{sp}(p) = \qty{\beta \mid \exists\alpha.\, \langle \alpha, \beta \rangle \in \dom p} \]
    As \( \abs{p} < \kappa \), we must have \( \abs{\operatorname{sp}(p)} < \kappa \).
    Let \( W \) be an antichain.
    We will construct chains \( (A_\alpha)_{\alpha < \kappa} \) and \( (W_\alpha)_{\alpha < \kappa} \) such that
    \begin{enumerate}
        \item for \( \alpha < \beta < \kappa \), \( A_\alpha \subseteq A_\beta \) and \( W_\alpha < W_\beta \);
        \item if \( \gamma < \kappa \) is a limit, then \( A_\gamma = \bigcup_{\alpha < \gamma} A_\alpha \) and \( W_\gamma = \bigcup_{\alpha < \gamma} W_\alpha \);
        \item \( W = \bigcup_{\alpha < \kappa} W_\alpha \);
        \item for all \( \alpha < \kappa \), \( \abs{A_\alpha}, \abs{W_\alpha} < \lambda \).
    \end{enumerate}
    Assuming this can be done, since \( \lambda \) is regular, we have \( \abs{W} = \abs{\bigcup_{\alpha < \kappa} W_\alpha} < \lambda \).
    To do this, first set \( A_0 = W_0 = \varnothing \).
    To define successor cases, suppose \( A_\alpha, W_\alpha \) are defined.
    Suppose that \( p \in \operatorname{Col}(\kappa, <\lambda) \) has \( \operatorname{sp}(p) \subseteq A_\alpha \).
    Using the axiom of choice, choose \( q_p \in W \) such that \( p = \eval{q_p}_{\kappa \times \operatorname{sp}(p)} \) if this exists.
    Define
    \[ W_{\alpha + 1} = \qty{q_p \mid \operatorname{sp}(p) \subseteq A_\alpha};\quad A_{\alpha + 1} = \bigcup\qty{\operatorname{sp}(q) \mid q \in W_{\alpha + 1}} \]
    One can show that \( W = \bigcup_{\alpha < \kappa} W_\alpha \) in the same way that we proved this for \( \Fn_\kappa(I, J) \).
    We show by induction that for \( \alpha < \kappa \), \( \abs{A_\alpha}, \abs{W_\alpha} < \lambda \).
    Limit cases follow by regularity.
    If \( \abs{W_{\alpha + 1}} < \lambda \), then \( \abs{A_{\alpha + 1}} < \kappa \cdot \lambda = \lambda \).
    Suppose \( \abs{A_{\alpha}} < \lambda \).
    Then, since every \( q \) added in stage \( \alpha + 1 \) is chosen from some condition with support contained in \( A_\alpha \), we must have
    \[ \abs{W_{\alpha + 1}} \leq \abs{A_\alpha}^{<\kappa} \]
    Then as \( \lambda \) is a strong limit, \( \abs{A_\alpha}^{<\kappa} < \lambda \).
\end{proof}
\begin{remark}
    \begin{enumerate}
        \item The requirement that \( \kappa \) was regular allowed us to deduce \( \kappa \)-closure.
        \item Suppose \( \lambda \) is weakly inaccessible and \( 2^{\aleph_0} > \lambda \).
        Then \( \operatorname{Col}(\aleph_1, <\lambda) \) has an antichain of length \( 2^{\aleph_0} \), so will not satisfy the \( \lambda \)-chain condition.
        Indeed, for \( A \subseteq \omega \), we define \( p_A : \qty{\omega} \times [\omega, \omega + \omega) \to 2 \) by
        \[ p_A(\alpha, \omega + n) = \begin{cases}
            0 & \text{if } n \in A \\
            1 & \text{if } n \notin A
        \end{cases} \]
        Then if \( A \neq B \), the functions \( p_A, p_B \) are incompatible.
        \item One can show that \( \lambda \) is weakly compact if and only if it is inaccessible and satisfies the \emph{tree property}.
        We claim that if \( G \) is \( \operatorname{Col}(\aleph_0, <\lambda) \)-generic, then in \( M[G] \), \( \aleph_1 \) has the tree property.
        In general, we can use forcing to add combinatorial properties from large cardinals to \( \aleph_1 \).
        \item This shows that \( \lambda \) being a limit cardinal is not absolute between \( M \) and \( N \), even if \( \lambda \) being a cardinal is absolute for \( M, N \).
    \end{enumerate}
\end{remark}
\begin{corollary}
    If \( \mathsf{ZFC} + \mathsf{IC} \) is consistent, then so is \( \mathsf{ZFC} + \text{\( \aleph_1^{\mathrm{V}} \) is inaccessible in \( L \)} \).
\end{corollary}
\begin{proof}
    Start with a model of \( \mathrm{V} = \mathrm{L} \) and let \( G \) be \( \operatorname{Col}(\omega_1, <\lambda) \)-generic.
    Then \( M[G] \vDash \lambda = \aleph_1 \), but also \( M[G] \vDash (\lambda \text{ is inaccessible})^L \).
\end{proof}
\begin{remark}
    If \( \mathrm{V} \vDash \mathsf{ZFC} + \kappa \text{ is measurable} \), then for example, \( \aleph_1^{\mathrm{V}} \) is inaccessible in \( \mathrm{L} \).
\end{remark}

\subsection{Product forcing}
In this subsection, we will show that is consistent that, for example, each \( n \in \omega \) satisfies \( 2^{\aleph_n} = \aleph_{2n + 3} \).
We have already shown that for a fixed \( N \in \omega \), it is consistent that all \( n \in \omega \) have \( 2^{\aleph_n} = \aleph_{2n + 3} \).
However, we cannot get this result using the iterated forcing process described in previous sections, and will instead use \emph{product forcing}.
This technique will allow us to exactly determine the restrictions on the continuum function \( F : \mathrm{Card} \to \mathrm{Card} \) given by \( F(\aleph_\alpha) = 2^{\aleph_\alpha} \).
\begin{definition}
    Suppose \( (\mathbb P, \leq_{\mathbb P}) \) and \( (\mathbb Q, \leq_{\mathbb Q}) \) are posets.
    The \emph{product order} \( \leq \) on \( \mathbb P \times \mathbb Q \) is defined by
    \[ \langle p_1, q_1 \rangle \leq \langle p_0, q_0 \rangle \leftrightarrow p_1 \leq_{\mathbb P} p_0 \wedge q_1 \leq_{\mathbb Q} q_0 \]
\end{definition}
Given a \( \mathbb P \times \mathbb Q \)-generic filter \( G \) over \( M \), we can produce the \emph{projections}
\begin{align*}
    G_0 &= \qty{p \in \mathbb P \mid \exists q \in \mathbb Q.\, \langle p, q \rangle \in G} \\
    G_1 &= \qty{q \in \mathbb Q \mid \exists p \in \mathbb P.\, \langle p, q \rangle \in G}
\end{align*}
\begin{lemma}
    Let \( M \) be a transitive model of \( \mathsf{ZFC} \) with \( \mathbb P, \mathbb Q \in M \).
    Let \( G \subseteq \mathbb P \) and \( H \subseteq \mathbb Q \).
    Then the following are equivalent.
    \begin{enumerate}
        \item \( G \times H \) is \( \mathbb P \times \mathbb Q \)-generic over \( M \);
        \item \( G \) is \( \mathbb P \)-generic over \( M \) and \( H \) is \( \mathbb Q \)-generic over \( M[G] \);
        \item \( H \) is \( \mathbb Q \)-generic over \( M \) and \( G \) is \( \mathbb P \)-generic over \( M[H] \).
    \end{enumerate}
    Moreover, when this is the case, \( M[G \times H] = M[G][H] = M[H][G] \).
\end{lemma}
\begin{proof}
    The first part is left as an exercise.
    For the last part, recall that the generic model theorem shows that if \( N \) is a transitive model of \( \mathsf{ZF} \) containing \( M \) as a definable class and containing \( G \) as a set, then \( M[G] \subseteq N \).
    Since \( M \subseteq M[G][H] \), and \( G \times H \) is an element of \( M[G][H] \), we obtain \( M[G \times H] \subseteq M[G][H] \).
    For the other direction, \( G \in M[G \times H] \) and \( M \subseteq M[G \times H] \) so \( M[G] \subseteq M[G \times H] \), but also \( H \in M[G \times H] \) so \( M[G][H] \subseteq M[G \times H] \).
\end{proof}
Recall that we started with a model of \( \mathsf{ZFC} + \mathsf{GCH} \) and forced with
\[ G_0 \text{ is } \Fn(\omega_3 \times \omega, 2)^M \text{-generic};\quad G_1 \text{ is } \Fn_(\omega_5 \times \omega_1, 2)^{M[G_0]} \text{-generic} \]
and found that \( M[G_0][G_1] \vDash \mathsf{CH} \).
But if instead we used
\[ G_0 \text{ is } \mathbb P_0 = \Fn(\omega_5 \times \omega_1, 2)^M \text{-generic};\quad G_1 \text{ is } \mathbb P_1 = \Fn_(\omega_3 \times \omega, 2)^{M[G_0]} \text{-generic} \]
then we obtain \( M[G_0][G_1] \vDash 2^{\aleph_0} = \aleph_3 + 2^{\aleph_1} = \aleph_5 \).
However, \( \mathbb P_0 \) is \( <\omega_1 \)-closed, so does not add new sequences of length \( \omega \).
Thus \( \mathbb P_1 = \Fn(\omega_3 \times \omega, 2)^M \).
We can therefore define the forcing poset \( \mathbb P_0 \times \mathbb P_1 \)-over \( M \), and \( G_0 \times G_1 \) is \( \mathbb P_0 \times \mathbb P_1 \)-generic over \( M \).
To simultaneously force \( 2^{\aleph_n} = \aleph_{2n + 3} \), we use the poset
\[ \mathbb P = \prod_{n \in \omega} \Fn_{\omega_n}(\omega_{2n + 3} \times \omega_n, 2) \]
Easton's theorem shows that this works.
\begin{theorem}[Easton's theorem for sets]
    Let \( M \) be a countable transitive model of \( \mathsf{ZFC} + \mathsf{GCH} \).
    Let \( S \) be a set of regular cardinals in \( M \), and let \( F : S \to \mathrm{Card}^M \) be a function in \( M \) such that for all \( \kappa \leq \lambda \) in \( S \),
    \begin{enumerate}
        \item \( F(\kappa) > \kappa \) (Cantor's theorem);
        \item \( F(\kappa) \leq F(\lambda) \) (monotonicity);
        \item \( \cf(F(\kappa)) > \kappa \) (K\"onig's theorem).
    \end{enumerate}
    Then there is a generic extension \( M[G] \) of \( M \) such that \( M, M[G] \) have the same cardinals, and for all \( \kappa \in S \), \( M[G] \vDash 2^\kappa = F(\kappa) \).
\end{theorem}
The proof is non-examinable.

By essentially the same proof, this result can be generalised to proper classes of \( M \), and in particular \( S = \mathrm{Reg}^M \).
This needs a notion of \emph{class forcing}, as \( \mathbb P \) is a proper class.
The main obstacle with class forcing is that \( M[G] \) need not be a model of \( \mathsf{ZFC} \).
For example, consider \( \operatorname{Fn}(\mathrm{Ord} \times \omega, 2) \), which makes \( 2^{\aleph_0} \) a proper class.
Alternatively, consider \( \operatorname{Fn}(\omega, \mathrm{Ord}) \), which creates a surjection \( \bigcup G : \omega \to \mathrm{Ord} \).
In fact, the forcing relation \( \Vdash \) may not even be definable.
However, one can show that the particular forcing poset used in Easton's theorem also satisfies all of the required results for the proofs to work.
In conclusion, we can say almost nothing about the values of the continuum function.
